import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import path from "path"; // 直接导入，不是动态导入

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [uni()],
  optimizeDeps: {
    exclude: ['sard-uniapp'],
  },
  css: {
    preprocessorOptions: {
      scss: {
        silenceDeprecations: ['import', 'legacy-js-api'],
      },
    },
  },
  resolve: {
    alias: {
         '@': path.resolve(__dirname, '/src'),
       }
  }
});